Security News
CISA Brings KEV Data to GitHub
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
forward-emitter
Advanced tools
Forward events from any Node EventEmitter to another EventEmitter.
Forward events from one Node EventEmitter to another.
npm install forward-emitter
var forward = require('forward-emitter');
// Basic forwarding
forward(src, dest);
// Forward only selected events
// In this example, only the 'connect' event is forwarded.
forward(src, dest, function (eventName) {
return eventName === 'connect';
});
// Forward all events except exclusions
var exclusions = ['connect', 'disconnect'];
forward(src, dest, function(eventName) {
return exclusions.indexOf(eventName) === -1;
});
forward-emitter
listens to the newListener
and removeListener
events, introduced in Node 0.8
and
Node 0.10
respectively. When a callback is bound to an event on the destination emitter, the listener
is forwarded to the source emitter.
For that reason, this module should not be used in Node < 0.10
if you plan to use removeListener
.
FAQs
Forward events from any Node EventEmitter to another EventEmitter.
The npm package forward-emitter receives a total of 11,008 weekly downloads. As such, forward-emitter popularity was classified as popular.
We found that forward-emitter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.